package com.qianji.petmall.product.feign.fallback;

import com.qianji.common.exception.BizCodeEnum;
import com.qianji.common.utils.R;
import com.qianji.petmall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author liang zai
 * @date 2022/6/2 14:29
 * @description
 */
@Component
@Slf4j
public class SeckillFeignServiceFallback implements SeckillFeignService {

    @Override
    public R getSeckillSkuInfo(Long skuId) {
        log.info("触发了熔断保护.......");
        return R.error(BizCodeEnum.FALLBACK_FEIGN_EXCEPTION.getMsg());
    }
}
